<cc:page type="normal" style="customize" showSidebar="false" showHeader="false" />
<cc>CCService css = new CCService(userInfo);
    String acc_rc="202385551266A597FF1B";
    String appUserId=request.getParameter("id")==null?"":request.getParameter("id")+"";
    if(appUserId.equals("")||appUserId==null){
    List<CCObject> account = css.cqueryWithRoleRight("Account", "recordtype='" + acc_rc + "'");
        if(account.size()>0){
        appUserId=account.get(0).get("id")==null?"":account.get(0).get("id")+"";
        }
        }</cc>
<!DOCTYPE html>
<html lang="">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
    <meta name="viewport"
          content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
    <title>
    </title>
    <link href="https://cdn.bootcdn.net/ajax/libs/element-ui/2.15.7/theme-chalk/index.min.css" rel="stylesheet">
    <link href="https://cdn.bootcdn.net/ajax/libs/vant/2.12.39/index.min.css" rel="stylesheet">
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.1/vue.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/vant/2.12.39/vant.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/element-ui/2.15.7/index.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.24.0/axios.min.js"></script>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    #app {
        margin-bottom: 70px;
    }

    .van-popup--bottom {
        bottom: 80px;
    }

    .auto-item {
        padding: 6px 16px;
        font-size: 14px;
    }

    .name-style {
        display: inline-block;
        color: #E5851A
    }

    .el-scrollbar .el-scrollbar__bar {
        opacity: 1 !important;
    }

    .el-message--error,
    .el-message--success,
    .el-message--warning {
        top: 80px !important;
    }

    .el-autocomplete {
        width: 100%;
    }


    .top-style {
        width: 100%;
        height: 44px;
        background: #202329;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 .9375rem;
        position: fixed;
        top: 0;
        z-index: 9999;
    }

    .el-input__inner {
        height: 36px;
        line-height: 36px;
    }

    .top-style span {
        color: #ffffff;
        font-size: .875rem;
    }

    .top-style span:nth-child(2) {
        font-size: 1rem
    }

    .body-style .van-cell {
        background: #F4F6F9;
        height: 40px;
        line-height: 20px;
    }

    .body-style .van-cell__left-icon,
    .body-style .van-cell__right-icon {
        line-height: 20px;
    }

    .el-input-group__append,
    .el-input-group__prepend {
        background: #ffffff;
        border-left: none;
    }

    .label-text {
        color: #54698D;
        font-size: 12px;
        padding-bottom: 4px;
    }

    .label-texts {
        color: #54698D;
        font-size: 12px;
        padding-bottom: 4px;
    }

    .label-text::after {
        content: '*';
        color: #F56C6C;
    }

    .demo-form .demo-ruleForm {
        width: 460px;
    }

    .base-info {
        margin-bottom: 11px
    }

    .city-style {
        display: flex;
    }

    .city-style .el-select:nth-child(2) {
        margin: 0 4px;
    }

    /* .city-style .el-select-dropdown {
        display: none;
    } */
    .data-style,
    .data-styles {
        font-size: 13px;
        color: #54698D;
        margin: 2px 0 11px 0;
        font-weight: 600;
    }

    .data-styles::after {
        content: '*';
        color: #F56C6C;
    }

    .el-select {
        width: 100%;
    }

    .last-style p {
        padding: 6px 0 0 0;
        font-size: 15px;
        color: #16325C;
    }

    .last-style p span {
        color: #54698D;
        display: inline-block;
        width: 110px;
        margin-right: 46px;
    }

    .speical-style .el-input__inner {
        border-right: none;
    }

    .date-newstyle {
        display: flex;
        height: 36px;
        border-radius: 4px;
        justify-content: space-between;
        align-items: center;
        border: 1px solid #DCDFE6;
    }

    .jump {
        margin-right: 10px;
    }

    .jump::after {
        display: inline-block;
        width: 7px;
        height: 7px;
        border-top: 1px solid #666;
        border-right: 1px solid #666;
        transform: rotate(45deg);
        content: ' ';
        margin: 2px 0 0 4px;
        /* margin-left: 10px;
        transform: rotate(-135deg);
        border: 3px solid #AFB9CA; */
    }

    .el-input-group__append,
    .el-input-group__prepend {
        padding-right: 10px;
    }

    .top-styles {
        width: 100%;
        height: 44px;
        border-bottom: 1px solid #D8DDE6;
        line-height: 44px;
        padding: 0 15px;
        font-size: 18px;
        position: fixed;
        top: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #ffffff;
        z-index: 2147483646;
    }

    .top-styles p {
        position: absolute;
        left: 12px;
    }

    .el-textarea {
        width: 88%;
        margin: 20px
    }

    .van-icon,
    .van-icon::before {
        display: flex;
    }

    .detail-list {
        padding: 16px 15px;
        border-bottom: 1px solid #D8DDE6;
        font-size: 14px;
        color: #17315C;
        letter-spacing: 0;
    }

    .detail-list p {
        margin-top: 10px;
        display: flex;
    }

    .detail-list span:first-child {
        color: #54698D;
        margin-right: 18px;
        display: inline-block;
    }

    .win-special .detail-list span:first-child {
        display: inline-block;
        width: 130px;
    }

    .detail-list span:last-child {
        flex: 1;
    }

    .win-detail {
        background: #F4F6F9;
    }

    .win-special {
        background: #ffffff;
        margin-top: 0;
    }

    .win-date {
        padding: 9px 15px;
        margin-top: 44px;
    }

    .win-date .van-popup--bottom {
        bottom: 80px
    }

    .win-date-style {
        display: flex;
        align-items: center;
    }

    .win-date-style .el-select {
        width: 60%;
    }

    .win-date-style .el-select:first-child {
        margin-right: 6px;
    }

    .win-date-style .el-select:nth-child(2) {
        margin-left: 6px;
    }

    .win-date .el-popper[x-placement^=bottom] {
        display: none;
    }

    .build-style {
        display: flex;
        height: 46px;
        align-items: center;
        padding: 0 15px;
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 2147483647;
        background: #ffffff;
    }

    .build-style .el-input {
        width: 74%;
    }

    .build-style .el-input .el-input__inner {
        height: 26px;
        border-radius: 0;
        background: #F6F6F6;
        border: none;
        line-height: 26px;
    }

    .build-style .el-input__icon {
        line-height: 26px;
    }

    .build-content {}

    .build-list {
        padding: 15px 15px;
        border-bottom: 1px solid #D8DDE6;
        font-size: 14px;
        color: #16325C;
    }

    .build-list p {
        padding: 6px 0;
    }

    .checked {
        background: #D2D1D6;
    }

    .checkes {
        background: #ffffff;
    }

    .detail-box {
        min-height: 80vh;
        margin-bottom: 80px;
    }

    .showOpen {
        pointer-events: none;
    }

    .van-dialog {
        z-index: 2147483647 !important;
    }

    .van-overlay {
        z-index: 2147483646 !important;
    }
</style>

<body>
<div id="app">
    <!-- 新建页面 -->
    <div v-if='showCreate'>
        <!-- 头部信息 -->
        <div class='top-style'>
            <!--  <span @click='goIndex'>取消</span>-->
            <span></span>
            <span>新建客户</span>
            <span @click='submitFrom'>保存</span>
        </div>
        <div class="body-style">
            <van-collapse v-model="activeNames">
                <van-collapse-item title="基本信息" name="1">
                    <div>
                        <div class="base-info">
                            <p class="label-text">客户名称</p>
                            <div @click="openBuild">
                                <el-input ref="jbxxkhmc" data-name="客户名称" v-model="jbxx.khmc" placeholder="请输入内容"
                                          suffix-icon="el-icon-search">
                                </el-input>
                            </div>

                        </div>
                        <div class="base-info">
                            <p class="label-text">统一社会信用代码</p>
                            <el-input ref="jbxxtyshxydm" data-name="统一社会信用代码" v-model="jbxx.tyshxydm" placeholder="请输入内容">
                            </el-input>
                        </div>
                        <div class="base-info">
                            <p class="label-text">注册省/市/区</p>
                            <div class="city-style">
                                <el-select v-model="jbxx.zcsf" placeholder="请选择" @change="zcssChange" ref="jbxxzcsf" data-name="注册省份">
                                    <el-option v-for="(item, index) in sfList" :key="item" :label="index" :value="index">
                                    </el-option>
                                </el-select>
                                <el-select v-model="jbxx.zcsq" placeholder="请选择" @change="zcsqChange" ref="jbxxzcsq" data-name="注册市区">
                                    <el-option v-for="item in sfList[jbxx.zcsf]" :key="item.pid" :label="item.label"
                                               :value="item.value">
                                    </el-option>
                                </el-select>
                                <el-select v-model="jbxx.zcqx" placeholder="请选择" @change="zcqxChange" ref="jbxxzcqx" data-name="注册区县">
                                    <el-option v-for="item in qxList" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </div>
                            <!-- <van-area
                                                title="标题"
                                                :area-list="areaList"
                                                :columns-placeholder="['请选择', '请选择', '请选择']"
                                                /> -->
                        </div>
                        <div class="base-info">
                            <p class="label-text">注册地址</p>
                            <el-input v-model="jbxx.zcdz" placeholder="请输入内容" ref="jbxxzcdz" data-name="注册地址">
                            </el-input>
                        </div>
                        <div class="base-info">
                            <p class="label-text">法定代表人</p>
                            <el-input ref="jbxxfddbr" data-name="法定代表人" v-model="jbxx.fddbr" placeholder="请输入内容">
                            </el-input>
                        </div>
                        <div class="base-info">
                            <p class="label-text">注册资本(万)</p>
                            <el-input ref="jbxxzczb" data-name="注册资本（万）" v-model="jbxx.zczb" placeholder="请输入内容">
                            </el-input>
                        </div>
                        <div class="base-info">
                            <p class="label-text">企业性质</p>
                            <el-select ref="jbxxqyxz" data-name="企业性质" v-model="jbxx.qyxz" placeholder="请选择">
                                <el-option v-for="item in qyxzList" :key="item.value" :label="item.label" :value="item.value">
                                </el-option>
                            </el-select>
                        </div>
                        <div class="base-info">
                            <p class="label-text">成立日期</p>
                            <el-date-picker style='width: 100%;' type="date" v-model="jbxx.clrq" ref="jbxxclrq" data-name="成立日期"
                                            disabled>
                            </el-date-picker>
                            <!-- <van-calendar v-model="show"/> -->
                        </div>
                    </div>
                </van-collapse-item>
                <van-collapse-item title="公招信息" name="2">
                    <div>
                        <div class="base-info">
                            <p class="label-text">一级注册建造师人数</p>
                            <el-input v-model="gzxx.yjzcjzss" placeholder="请输入内容" ref="gzxxyjzcjzsrs" data-name="一级注册建造师人数">
                            </el-input>
                        </div>
                        <div class="base-info">
                            <p class="label-text">二级注册建造师人数</p>
                            <el-input v-model="gzxx.ejzcjzss" placeholder="请输入内容" ref="gzxxejzcjzsrs" data-name="二级注册建造师人数">
                            </el-input>
                        </div>
                        <div class="base-info">
                            <p class="label-text">工程资质数量</p>
                            <el-input v-model="gzxx.gczzsl" placeholder="请输入内容" ref="gzxxgczzsl" data-name="工程资质数量">
                                <template slot="append"> <span class="jump" @click='openQuaDeatil'>资质明细</span></template>
                            </el-input>
                        </div>
                        <div class="base-info">
                            <p class="label-texts">主要投标工程类别</p>
                            <el-select v-model="gzxx.zytbgclb" placeholder="请选择">
                                <el-option v-for="item in zytbgclbList" :key="item.value" :label="item.label" :value="item.value">
                                </el-option>
                            </el-select>
                        </div>
                        <div class="base-info">
                            <p class="label-texts">主要投标区域</p>
                            <el-select v-model="gzxx.zytbqy" placeholder="请选择">
                                <el-option v-for="item in zytbqyList" :key="item.value" :label="item.label" :value="item.value">
                                </el-option>
                            </el-select>
                        </div>
                        <div class="base-info">
                            <p class="label-texts">所属圈层</p>
                            <el-select v-model="gzxx.ssqc" placeholder="请选择">
                                <el-option v-for="item in ssqcList" :key="item.value" :label="item.label" :value="item.value">
                                </el-option>
                            </el-select>
                        </div>
                        <div class="data-style">投中标数据</div>
                        <div class="base-info">
                            <p class="label-texts">统计时间</p>
                            <!-- <el-input v-model="showDate" @focus='showDate = true'></el-input>
                                            <van-calendar type="range" v-model="showDate"/> -->
                            <div class='date-newstyle'>
                  <span @click='showDate = true'
                        style='flex:1;height: 36px;line-height: 36px;padding-left: 16px;'>{{tzbsjtjsj[0]}}至{{tzbsjtjsj[1]}}</span>
                                <span class="jump" @click='openWinDeatil'>查看</span>
                            </div>
                            <!-- <el-input
                                                v-model="tzbsjtjsj"
                                                @focus='showDate = true'
                                                class="input-with-select speical-style">
                                              <template slot="append"> </template>
                                            </el-input> -->
                            <van-calendar type="range" v-model="showDate" @confirm="onConfirm" :min-date="minDate" />
                        </div>
                        <div v-for='(item,index) in jyzxtbpl' :key='index'>
                            <div style='display: flex;justify-content: space-between;'>
                                <div class="data-styles">交易中心投标频率 </div>
                                <van-button type="warning" style="height: 26px;" @click='removeJyzx(index)'
                                            v-if='jyzxtbpl.length > 1 && jyzxtbpl.length != 1'>删除</van-button>
                            </div>
                            <div class="base-info">
                                <p class="label-texts">公共资源交易中心</p>
                                <el-select v-model="item.ggzyjyzx" placeholder="请选择" :ref="'gzxxggzyjyzx' + index"
                                           data-name="公共资源交易中心">
                                    <el-option v-for="itm in ggzyjyzxList" :key="itm.value" :label="itm.label" :value="itm.value">
                                    </el-option>
                                </el-select>
                            </div>
                            <div class="base-info">
                                <p class="label-texts">投标频次</p>
                                <el-select v-model="item.tbpc" placeholder="请选择" :ref="'gzxxgtbpc' + index" data-name="投标频次">
                                    <el-option v-for="itm in tbpcList" :key="itm.value" :label="itm.label" :value="itm.value">
                                    </el-option>
                                </el-select>
                            </div>

                        </div>
                        <div style='text-align: center;'>
                            <van-button type="primary" style="height: 26px;" @click='addJyzx'>添加</van-button>

                        </div>

                    </div>
                </van-collapse-item>
                <van-collapse-item title="共享管护" name="3">
                    <div>

                        <div class="base-info">
                            <p class="label-text">联系地址</p>
                            <el-input clearable v-model="gxgh.lxdz" placeholder="请输入内容" ref="gxghlxdz" data-name="联系地址"
                                      id="lxdzmhss">
                            </el-input>
                        </div>
                        <div class="base-info">
                            <p class="label-text">经营省/市/区</p>
                            <div class="city-style">
                                <el-select v-model="gxgh.jysf" placeholder="请选择" @change="jyssChange" ref="gxghjysf" data-name="经营省份">
                                    <el-option v-for="(item, index) in gxghsfList" :key="item" :label="index" :value="index">
                                    </el-option>
                                </el-select>
                                <el-select v-model="gxgh.jysq" placeholder="请选择" @change="jysqChange" ref="gxghjysq" data-name="经营市区">
                                    <el-option v-for="item in gxghsfList[gxgh.jysf]" :key="item.pid" :label="item.label"
                                               :value="item.value">
                                    </el-option>
                                </el-select>
                                <el-select v-model="gxgh.jyqx" placeholder="请选择" @change="jyqxChange" ref="gxghjyqx" data-name="经营区县">
                                    <el-option v-for="item in gxghqxList" :key="item.value" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </div>
                            <!-- <van-area
                                                title="标题"
                                                :area-list="areaList"
                                                :columns-placeholder="['请选择', '请选择', '请选择']"
                                                /> -->
                        </div>
                        <div class="base-info">
                            <p class="label-text">管户区域</p>
                            <el-select v-model="gxgh.ghqy" placeholder="请选择" multiple ref="gxghghqy" data-name="管护区域">
                                <el-option v-for="item in gxghghqyList" :key="item.value" :label="item.label" :value="item.value">
                                </el-option>
                            </el-select>
                        </div>
                    </div>
                </van-collapse-item>
                <van-collapse-item title="来源渠道" name="4">
                    <div>
                        <div class="base-info">
                            <p class="label-text">客户来源</p>
                            <el-select v-model="lyqd.khly" placeholder="请选择" ref="lyqdkhly" data-name="客户来源">
                                <el-option v-for="item in khlyList" :key="item" :label="item.label" :value="item.value">
                                </el-option>
                            </el-select>
                        </div>
                        <div class="base-info" v-if="lyqd.khly != '主动营销'">
                            <p :class="lyqd.khly == '客户推荐' ? 'label-text' : 'label-texts'">推荐客户</p>
                            <el-autocomplete popper-class="my-autocomplete" v-model="tjkhLabel" :fetch-suggestions="khlymhsskh"
                                             placeholder="请输入内容" @select="khlymhssSelect" suffix-icon="el-icon-search"
                                             :ref="lyqd.khly == '客户推荐' ? 'lyqdkhtj' : ''" data-name="推荐客户">
                                <i class="el-icon-edit el-input__icon" @click="khlymhssSelectItemClick">
                                </i>
                                <template slot-scope="{ item }">
                                    <div class="name">{{ item.value }}</div>
                                    <span class="addr">{{ item.address }}</span>
                                </template>
                            </el-autocomplete>
                        </div>
                        <div class="base-info" v-if="lyqd.khly != '主动营销'">
                            <p :class="lyqd.khly == '员工推荐' ? 'label-text' : 'label-texts'">推荐员工</p>
                            <el-autocomplete popper-class="my-autocomplete" v-model="tjyhLabel" :fetch-suggestions="khlymhssyg"
                                             placeholder="请输入内容" @select="khlymhssSelect" suffix-icon="el-icon-search"
                                             :ref="lyqd.khly == '员工推荐' ? 'lyqdygtj' : ''" data-name="推荐员工">
                                <i class="el-icon-edit el-input__icon" @click="khlymhssSelectItemClick">
                                </i>
                                <template slot-scope="{ item }">
                                    <div class="name">{{ item.value }}</div>
                                    <span class="addr">{{ item.address }}</span>
                                </template>
                            </el-autocomplete>
                            <!-- <van-area
                                                title="标题"
                                                :area-list="areaList"
                                                :columns-placeholder="['请选择', '请选择', '请选择']"
                                                /> -->
                        </div>
                    </div>
                </van-collapse-item>
                <van-collapse-item title="系统信息" name="5">
                    <div class="last-style">
                        <p><span>客户跟进状态：</span>{{ xtxx.khgjzt }}</p>
                        <p><span>客户开函状态：</span>{{ xtxx.khkhzt }}</p>
                        <p><span>所有人：</span>{{ xtxx.syr.value }}</p>
                        <p><span>创建人：</span>{{ xtxx.cjr.value }}</p>
                    </div>
                </van-collapse-item>
            </van-collapse>

        </div>
    </div>
    <!-- 资质明细 -->
    <div v-if='showDetail'>
        <!-- 头部信息 -->
        <div class='top-styles'>
            <p>
                <van-icon name="arrow-left" @click='goBackCreate("zj")' />
            </p>
            <div>资质明细</div>
        </div>
        <div class="detail-box">
            <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoadDetail">
                <div class="detail-list" v-for='item in  zzmxList'>
                    <p><span>资质类别</span><span>{{ item.category }}</span></p>
                    <p><span>资质名称</span><span>{{ item.certName }}</span></p>
                    <p><span>资质等级</span><span>{{ item.level }}</span></p>
                    <p><span>发证时间</span><span>{{ item.issueDateTime}}</span></p>
                    <p><span>到期时间</span><span>{{ item.validityDate }}</span></p>
                </div>
            </van-list>

        </div>
    </div>
    <!-- <van-calendar v-model="showDate" type="range" @confirm="onConfirm"/>  -->
    <!-- 投中标数据 -->
    <div v-if='showWinDetail' class="win-detail">
        <div class='top-styles'>
            <p>
                <van-icon name="arrow-left" @click='goBackCreate' />
            </p>
            <div>投中标数据</div>
        </div>
        <div class="win-date">
            <div class="win-date-style">
                <el-select v-model="tzbsjtjsj[0]" @focus='showDates = true'></el-select>
                —
                <el-select v-model="tzbsjtjsj[1]" @focus='showDates = true'></el-select>
                <div style='margin-left: 10px;width:60px' @click='qyjyzxtzbxxcx'>查询</div>
            </div>
            <van-calendar v-model="showDates" type="range" @confirm="onConfirms" :min-date="minDate" />
        </div>
        <div class="detail-box win-special">
            <van-list v-model="loadingW" :finished="finishedW" finished-text="没有更多了" @load="onLoadWin">
                <div class="detail-list" v-for='item in tzbsjList'>
                    <p><span>公共资源交易中心</span><span>{{ item.sourceName }}</span></p>
                    <p><span>投标次数</span><span>{{ item.bidsNumber }}</span></p>
                    <p><span>中标次数</span><span>{{ item.winningNumber }}</span></p>
                    <p><span>中标总金额(万元)</span><span>{{ item.winningAmount }}</span></p>
                    <p><span>最大中标金额(万元)</span><span>{{ item.maxWinningAmount }}</span></p>
                </div>
            </van-list>
        </div>
    </div>
    <!-- 查询建设库 -->
    <div v-if='showBuild'>
        <div class='build-style'>
            <el-input placeholder="请输入内容" v-model="cxjskSerch" prefix-icon='el-icon-search' :clearable="true">
            </el-input>
            <div style='margin-left: 10px;' @click='SearchCompany'>搜索</div>
            <div style='margin-left: 10px;' @click='closeBuild'>取消</div>
        </div>
        <div class="build-content">
            <div class="build-list" @click="checkList(index)" :class="index == cxjskChecked ? 'checked' : 'checkes'"
                 v-for="(item, index) in cxjskList" :key="index">
                <p v-html="item.name"></p>
                <p>统一社会信用代码：{{ item.creditCode }}</p>
                <p>法人：{{ item.corporatePerson }}</p>
                <p>注册地址：{{ item.regAddress }}</p>
            </div>
        </div>
    </div>
    <!-- 拾回理由 -->
    <van-dialog v-model="showAddress" title="拾回理由" show-cancel-button style="z-index: 2147483647;"
                @cancel='showAddress = false' :before-close='sureAddress'>
        <el-input placeholder="请输入内容" type="textarea" :rows="4" v-model="shText">
        </el-input>
    </van-dialog>
</div>
</body>

<script>
    var appUserId = "<cc:outprint>appUserId</cc:outprint>"
    new Vue({
        el: '#app',
        props: {
            elePropObj: {
                type: Object,
                default: () => ({}),
            },
            eleEventObj: {
                type: Object,
                default: () => ({}),
            },
        },
        data: {
            shText: '',
            showAddress: false,
            propObj: {
                id: '',
                pageApi: 'createPage',
                defaultValue: '瀚华新建用户',
                type: 'primary',
                fontSize: 16,
                functionContent: `function test(conext,value) {
            let requestParams = {
              className: "TestUpdate", // 类名 string
              methodName: "queryGao", // 方法名 string
              params: [], // 请求参数
            };
            return requestParams;
        }`,
                handleComponentId: '',
                axiosAddres: 'http://localhost:8080/api/pc/1.0/school/add',
                className: '',
            },
            showCreate: true, //控制新建部分的显示隐藏
            showDetail: false, //控制资质明细显示隐藏
            showWinDetail: false, //控制中标明细
            showBuild: false, //查询建设库
            showDate: false, //控制日期组件
            showDates: false,
            activeNames: ['1', '2', '3', '4', '5'],
            url: ['https://k8mm3cmt3235c7ed72cede6e.cloudcc.com/customize/page/eed30c4aea/saveAccount.jsp',
                'https://k8mm3cmt3235c7ed72cede6e.cloudcc.com/customize/page/eed30c4aea/queryDSK.jsp'
            ],
            jyzxtbpl: [{}], //交易中心投标频率
            name: '',
            loading: false,
            finished: false,
            loadingW: false,
            finishedW: false,
            submit: true,
            //滚动高度
            topList: [0, 0, 0, 0],
            //下拉加载
            load: false,
            // 数据列表
            // 公司信息
            companyInfo: [],
            companyInfoAll: [],
            // 省份
            ggzyjyzx: '',
            tbpc: '',
            invokeId: '12345678',
            sfList: [],
            // 市区
            sqList: [],
            // 县
            qxList: [],
            // 企业性质
            qyxzList: [],

            // 基本信息数据
            jbxx: {
                khmc: '',
                tyshxydm: '',
                zcsf: '',
                zcsq: '',
                zcqx: '',
                zcdz: '',
                fddbr: '',
                zczb: '',
                qyxz: '',
                clrq: '2022-1-6',
                khgjzt: '待跟进',
                khkhzt: '未开函',
                syr: '张三',
                cjr: '张三',
            },
            // 系统信息
            xtxx: {
                khgjzt: '待跟进',
                khkhzt: '未开函',
                syr: [],
                cjr: [],
            },
            // 工程资质明细
            gczzList: [],
            // 主要投标工程类别
            zytbgclbList: [],
            // 主要投标区域
            zytbqyList: [],
            // 所属圈层
            ssqcList: [],
            // 时间快捷选择
            // 投中标数据列表
            tzbsjList: [],
            // 当前页数
            tzbsjListNum: 1,
            // 表格显示数量
            tzbsjTableList: [],
            //公共资源交易中心
            ggzyjyzxList: [],
            // 交易中心投标频率
            tbpcList: ['高频', '中频', '低频'],
            // 公招信息数据
            gzxx: {
                yjzcjzss: 0,
                ejzcjzss: 0,
                gczzsl: '',
                zytbgclb: '',
                zytbqy: '',
                ssqc: '',
            },
            //时间
            tzbsjtjsj: [],
            // 联系地址
            gxghlxdzList: [],
            // 省份
            gxghsfList: [],
            // 市区
            gxghsqList: [],
            // 县
            gxghqxList: [],
            // 管户区域
            gxghghqyList: [],

            // 共享管户
            gxgh: {
                lxdz: '',
                jysf: '',
                jysq: '',
                jyqx: '',
                ghqy: '',
            },
            // 管护权查询
            ghqcxbs: {
                invokeId: '12345678',
                data: {
                    cusCertNo: '3276XX333010211413',
                    innerPlatformCode: 'A000130',
                },
            },

            // 客户来源
            khlyList: [],
            tjkhList: [],
            tjyhList: [],
            khlydqck: '',
            tjkhLabel: '',
            tjyhLabel: '',
            jyzxtbplList: [],
            //来源渠道
            lyqd: {
                khly: '',
                tjkh: '',
                tjyh: '',
            },

            // 查询建设库
            centerDialogVisible: false,
            // 查询建设库
            cxjskList: [],
            // 搜索
            cxjskSerch: '',
            // 选定
            cxjskChecked: '',

            // 资质明细弹窗
            ifZzmxPopup: false,
            // 资质明细列表
            zzmxList: [],
            zzmxTableList: [],
            zzmxNum: 1,
            defaultDate: [],
            minDate: new Date(2010, 0, 1), //最小日历时间
            currentDetail: 1, //资质明细页码
            totalDetail: 0, //总条数资质明细
            totalWin: 0, //总条数中标


        },
        mounted () {
            window._AMapSecurityConfig = {
                securityJsCode: '39cbd69cf7a473bf0b5f5cd65dab3b19',
            }
            // this.tzbsjtjsj = [this.getClock(new Date()), this.getClock(new Date())]
            this.getSelectList()
            const _this = this
            this.MapLoader('8504754a1c875a2669348f85b863bfd3').then((AMap) => {
                AMap.plugin('AMap.Autocomplete', function () {
                    _this.mapSearch = new AMap.Autocomplete({
                        input: 'lxdzmhss',
                        datatype: "poi"
                    })

                    AMap.event.addListener(_this.mapSearch, 'select', function (data) {
                        if (data.poi.location != undefined) {
                            _this.$set(_this.gxgh, 'lxdz', data.poi.district + data.poi.address)
                            for (const key in _this.gxghsfList) {
                                let name = data.poi.district.slice(0, 3)
                                if (key.indexOf(name) != -1) {
                                    if (key != _this.gxgh.jysf) {
                                        _this.gxgh.jysq = ''
                                        _this.gxgh.jyqx = ''
                                    }
                                    _this.$set(_this.gxgh, 'jysf', key)
                                }
                            }
                        }
                    })
                })


            })
            // //监听页面滚动
            // window.addEventListener('scroll', this.scrollToTop)
            // this.gxghlxdzList = this.loadAll()
        },
        methods: {
            // 获取默认交易中心投标频率
            getTbpcList () {
                let data = []
                this.gxghghqyList.forEach((e) => {
                    data.push({
                        ggzyjyzx: e.value,
                        tbpc: '',
                    })
                })
                return data
            },
            sureAddress (action, done) {
                if (action === 'confirm') {
                    if (this.shText) {
                        let {
                            url,
                            userAxios,
                            jbxx,
                            xtxx,
                            gxgh,
                            shText
                        } = this
                        const _this = this
                        // 获取各个列表
                        let data = {
                            tyshxydm: jbxx.tyshxydm,
                            shly: shText
                        }
                        let params = {
                            type: 'findAccountRetrieve',
                            data: JSON.stringify(data)
                        }
                        userAxios(url[0], params, (res) => {
                            let data = res
                            if (data.code != '200') {
                                _this.$dialog.confirm({
                                    title: '提示',
                                    message: data.msg,
                                    confirmButtonText: '确定',
                                    type: 'warning',
                                })
                                    .then(() => {
                                        window.location.href =
                                            'https://k8mm3cmt3235c7ed72cede6e.cloudcc.com/weiquery.action?m=query&id=' + data.id
                                    })
                            } else {
                                _this.$message({
                                    message: '拾回成功!',
                                    type: 'success'
                                })
                                window.location.href =
                                    'https://k8mm3cmt3235c7ed72cede6e.cloudcc.com/weiquery.action?m=query&id=' + data.id
                            }
                        })
                        return done()
                    } else {
                        this.$message.error('拾回理由必填')
                        return done(false)
                    }
                } else {
                    return done()
                }
            },
            //修改change
            changeJyzx (e, index) {
                let data = this.jyzxtbpl[index]
                data.ggzyjyzx = e
                this.$set(this.jyzxtbpl, index, data)
            },
            changeTbpc (e, index) {
                let data = this.jyzxtbpl[index]
                data.tbpc = e
                this.$set(this.jyzxtbpl, index, data)
                // this.jyzxtbpl[index].tbpc = e
            },
            //动态添加交易中心投标频率
            addJyzx () {
                this.jyzxtbpl.push({
                    ggzyjyzx: '',
                    tbpc: ''
                })
            },
            //动态删除交易中心投标频率
            removeJyzx (index) {
                this.jyzxtbpl.splice(index, 1)
                this.$forceupdate()
            },

            async MapLoader (key) {
                return new Promise((resolve, reject) => {
                    if (window.AMap) {
                        window.onload = function () {
                            resolve(window.AMap)
                        }
                    } else {
                        var script = document.createElement('script');
                        script.type = 'text/javascript';
                        script.axync = true;
                        script.src = 'https://webapi.amap.com/maps?v=1.4.15&key=' + key; // 申请个人 key
                        script.onerror = reject;
                        document.head.appendChild(script);
                        window.onload = function () {
                            resolve(window.AMap)
                        }
                    }
                })
            },
            goIndex () {
                //window.location.href='/WeiXinLeshi_index.action';

                window.location.href ='https://k8mm3cmt3235c7ed72cede6e.cloudcc.com/weiquery.action?m=query&id=' + appUserId

            },
            scrollToTop () {
                let scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
                console.log(scrollTop, 44)
                if (this.showCreate) {
                    this.topList[0] = scrollTop
                } else if (this.showDetail) {
                    this.topList[1] = scrollTop
                } else if (this.showWinDetail) {
                    this.topList[2] = scrollTop
                }
            },
            //获取cookie的值
            getCookie (key) {
                let value = decodeURIComponent(document.cookie.replace(new RegExp('(?:(?:^|.*;)\\s*' + encodeURIComponent(
                    key).replace(/[\-\.\+\*]/g, '\\$&') + '\\s*\\=\\s*([^;]*).*$)|^.*$'), '$1')) || null;
                if (value && value.substring(0, 1) === '{' && value.substring(value.length - 1, value.length) === '}') {
                    try {
                        value = JSON.parse(value);
                    } catch (e) {
                        return value;
                    }
                }
                return value;
            },
            // http请求封装
            getRequest (url, params) {
                const service = axios.create({
                    timeout: 60000, // request timeout
                    headers: {
                        'Content-Type': 'application/json; charset=utf-8',
                    },
                })
                // request interceptor
                service.interceptors.request.use(
                    config => {
                        config.headers.accessToken = this.getCookie('binding')
                        return config
                    },
                    error => {
                        // Do something with request error
                        Promise.reject(error)
                    }
                )

                // response interceptor
                service.interceptors.response.use(
                    response => {
                        const code = response.status || 200
                        if (code !== 200) {
                            return Promise.reject(null == response.statusText ? "未知异常" : response.statusText)
                        } else {
                            return response.data
                        }
                    },
                    error => {
                        return Promise.reject(error)
                    }
                )
                // getLight(url, data = {}, responseType = '') {

                // },
                return service({
                    url: url,
                    method: 'post',
                    params: {
                        ...params
                    }
                })
            },
            //动态加载资质明细列表
            onLoadDetail () {
                // 异步更新数据
                // setTimeout 仅做示例，真实场景中一般为 ajax 请求
                if (this.zzmxList.length === this.totalDetail) {
                    this.loading = false
                    this.finished = true;
                    return
                }
                this.currentDetail++;
                this.zzlbcx()
            },
            //动态加载投中标数据列表
            onLoadWin () {
                if (this.tzbsjList.length === this.totalWin) {
                    this.finishedW = true;
                    this.loadingW = false
                    return;
                }
                this.tzbsjListNum++;
                this.qyjyzxtzbxxcx()
            },
            // 资质列表搜索
            zzlbcx () {
                let {
                    url,
                    userAxios,
                    companyInfo,
                    currentDetail,
                    invokeId
                } = this
                let data = {
                    invokeId,
                    data: {
                        //creditCode:"91350124064149509A",
                        creditCode: companyInfo.creditCode,
                        pageIndex: currentDetail,
                        pageSize: 20
                    }
                }
                let params = {
                    type: 'buildCertSearchService',
                    data: JSON.stringify(data)
                }
                userAxios(url[1], params, (res) => {
                    if (res.resultCode != '0000') {
                        this.$message.error(res.resultMessage)
                    } else {
                        if (res.data) {
                            this.totalDetail = res.data.totalSize
                        }
                        if (res.data && res.data.infos.length) {
                            if (currentDetail === 1) {
                                this.zzmxList = res.data.infos
                            } else {
                                this.zzmxList = this.zzmxList.concat(res.data.infos);
                                this.loading = false
                            }
                        } else {
                            if (currentDetail === 1) {
                                this.zzmxList = []
                            }
                        }
                    }



                })
            },
            // 点击返回按钮
            goBackCreate (type) {
                this.showCreate = true
                this.showDetail = false
                this.showWinDetail = false
                this.showBuild = false
                let top = 700
                if (type === 'zj') {
                    top = 600
                }
                this.$nextTick(() => {
                    document.documentElement.scrollTop = top
                    document.body.scrollTop = top
                    window.pageYOffset = top
                })
            },
            // 点击资质明细打开明细详情
            openQuaDeatil () {
                window.pageYOffset = 0
                document.documentElement.scrollTop = 0
                document.body.scrollTop = 0
                this.showDetail = true
                this.showCreate = false
                this.showWinDetail = false
                this.showBuild = false
                this.zzmxNum = 1
            },
            // 点击查看中标明细
            openWinDeatil () {
                window.pageYOffset = 0
                document.documentElement.scrollTop = 0
                document.body.scrollTop = 0
                this.qyjyzxtzbxxcx()
            },
            // 关闭建设库
            closeBuild () {
                this.showCreate = true
                this.showBuild = false
                this.showWinDetail = false
                this.showDetail = false
                this.cxjskList = []
                this.cxjskSerch = ''
            },
            openBuild () {
                this.showCreate = false
                this.showBuild = true
                this.showWinDetail = false
                this.showDetail = false
            },
            onConfirm (date) {
                const [start, end] = date;
                console.log(start, end)
                this.showDate = false;
                this.tzbsjtjsj = [this.getClock(start), this.getClock(end)];
                // this.qyjyzxtzbxxcx()
                // console.log(start,end,this.tzbsjtjsj,34)
            },
            onConfirms (date) {
                const [start, end] = date;
                console.log(start, end)
                this.showDates = false;
                this.tzbsjtjsj = [start, end];
                this.tzbsjtjsj = [this.getClock(start), this.getClock(end)];
                // console.log(start,end,this.tzbsjtjsj,34)
            },
            //时间格式化
            formatDate (date) {
                return `${date.getMonth() + 1}/${date.getDate()}`;
            },
            /**
             * 网络请求
             */
            userAxios (path, params, funcTion = () => { }) {
                this.getRequest(path, params)
                    .then(
                        (res) => {
                            funcTion(res)
                            return res
                        },
                        (err) => {
                            return err
                        }
                    )
                    .catch((error) => {
                        return error
                    })
            },
            // 获取列表
            getSelectList () {
                let {
                    url,
                    userAxios,
                    gxgh
                } = this

                const _this = this

                // 获取各个列表
                // 获取客户来源
                let params = {
                    type: 'accountSource',
                }
                userAxios(url[0], params, (res) => {
                    console.log(res)
                    if (res) _this.khlyList = res
                })
                // 企业性质
                params.type = 'picklistValue'
                userAxios(url[0], params, (res) => {
                    if (res) _this.qyxzList = res
                })
                // 投标频次
                params.type = 'peleNumInfo'
                userAxios(url[0], params, (res) => {
                    if (res) _this.tbpcList = res
                })
                // 城市省区
                params.type = 'findProvinceCityInfo'
                userAxios(url[0], params, (res) => {
                    let sfList = res
                    _this.sfList = sfList
                    console.log(_this.sfList, 35435)
                    _this.gxghsfList = sfList
                })

                // 主要投标工程类型
                params.type = 'pickEleOpenInfoValue'
                userAxios(url[0], params, (res) => {
                    _this.zytbgclbList = res
                })
                // 所属圈层
                params.type = 'pickEleOpenCircleInfo'
                userAxios(url[0], params, (res) => {
                    _this.ssqcList = res
                })
                // 主要投标区域
                params.type = 'pickEleOpenMainAreaInfo'
                userAxios(url[0], params, (res) => {
                    _this.zytbqyList = res
                })

                // 公共资源交易中心列表
                params.type = 'findpsmcInfo'
                this.jyzxtbpl = []
                userAxios(url[0], params, (res) => {
                    _this.ggzyjyzxList = res.data
                    _this.gxghghqyList = res.data
                    _this.jyzxtbpl = _this.getTbpcList()

                })

                // 系统信息
                params.type = 'systemInfo'
                userAxios(url[0], params, (res) => {
                    let data = res.data
                    for (const key in data) {
                        _this.$set(_this.xtxx, key, data[key])
                    }
                })

                // 员工客户列表
                params.type = 'findAccount'
                userAxios(url[0], params, (res) => {
                    _this.tjkhList = res.data
                })
                params.type = 'findUser'
                userAxios(url[0], params, (res) => {
                    _this.tjyhList = res.data
                })
            },
            // 点击确认企业名称
            checkList (index) {
                this.cxjskChecked = index
                let {
                    cxjskChecked,
                    cxjskList,
                    zzlbcx,
                    gsjbxxcx,
                    gzxxcx
                } = this
                this.showBuild = false
                this.showCreate = true
                this.companyInfo = cxjskList[cxjskChecked]
                this.cxjskSerch = ''
                this.cxjskList = []
                this.currentDetail = 1
                this.tzbsjListNum = 1
                this.gzxx.ssqc = ''
                this.jyzxtbpl = this.getTbpcList()
                this.lyqd.khly = ''
                this.tjkhLabel = ''
                this.tjyhLabel = ''
                this.loadingW = false
                this.finishedW = false
                this.loading = false
                this.finished = false
                zzlbcx()
                gsjbxxcx()
                gzxxcx()
                if (!this.showBuild) {
                    this.cxjskChecked = 0
                    this.cxjskSerch = ''
                }
            },
            // 工商基本信息查询
            gsjbxxcx () {
                let {
                    url,
                    userAxios,
                    companyInfo,
                    invokeId
                } = this
                const _this = this
                let data = {
                    invokeId,
                    data: {
                        creditCode: companyInfo.creditCode
                    },
                }
                let params = {
                    type: 'companyBaseInfoService',
                    data: JSON.stringify(data),
                }
                userAxios(url[1], params, (res) => {
                    if (res.resultCode === '0000') {
                        let {
                            jbxx,
                            companyInfoAll,
                            $set,
                            getQxlist,
                            gxgh,
                            gxghghqyList,
                            getClock
                        } = _this
                        companyInfoAll = res.data
                        jbxx.khmc = companyInfoAll.companyName
                        jbxx.tyshxydm = companyInfoAll.creditCode

                        jbxx.zcsf = companyInfoAll.provinceHh
                        jbxx.zcsq = companyInfoAll.cityCodeHh
                        jbxx.zcqx = companyInfoAll.countyCodeHh

                        gxgh.jysf = companyInfoAll.provinceHh
                        gxgh.jysq = companyInfoAll.cityCodeHh
                        gxgh.jyqx = companyInfoAll.countyCodeHh

                        jbxx.zcdz = companyInfoAll.addressDetail
                        gxgh.lxdz = companyInfoAll.addressDetail

                        jbxx.fddbr = companyInfoAll.legaRepresentative
                        jbxx.zczb = companyInfoAll.registeredCapital
                        jbxx.qyxz = companyInfoAll.enterpriseNatureHh

                        $set(jbxx, 'clrq', companyInfoAll.businessDateFrom)

                        getQxlist(companyInfoAll.cityCodeHh, (res) => {
                            _this.qxList = res.data
                        })
                        getQxlist(companyInfoAll.cityCodeHh, (res) => {
                            _this.gxghqxList = res.data
                        })
                        _this.gxgh.ghqy = []
                        for (const e in gxghghqyList) {
                            _this.gxgh.ghqy.push(gxghghqyList[e].value)
                        }
                        const start = new Date()
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 365)
                        this.tzbsjtjsj = [getClock(start), getClock(new Date())]
                        qyjyzxtzbxxcx()
                    } else {
                        this.$message.error(res.resultMessage)
                    }
                })
            },
            // 公招信息查询
            gzxxcx () {
                let {
                    url,
                    userAxios,
                    companyInfo,
                    invokeId
                } = this
                const _this = this
                let data = {
                    invokeId,
                    data: {
                        creditCode: companyInfo.creditCode,
                        // creditCode: '91210283683020480C',
                    },
                }
                let params = {
                    type: 'companyInfoCountService',
                    data: JSON.stringify(data)
                }
                userAxios(url[1], params, (res) => {
                    let {
                        gzxx
                    } = _this
                    let data = res.data
                    if (res.resultCode === '0000') {
                        if (!data) {
                            _this.gzxx = {
                                yjzcjzss: '',
                                ejzcjzss: '',
                                gczzsl: '',
                                zytbgclb: '',
                                zytbqy: '',
                                ssqc: '',
                            }
                        } else {
                            gzxx.yjzcjzss = !data.registeredConstructorsFirst ?
                                0 :
                                data.registeredConstructorsFirst
                            gzxx.ejzcjzss = !data.registeredConstructorsSecond ?
                                0 :
                                data.registeredConstructorsSecond
                            gzxx.zytbqy = !data.mainBiddingArea ? '' : data.mainBiddingArea
                            gzxx.zytbgclb = !data.projectCategoryMoreThenFifty ?
                                '' :
                                data.projectCategoryMoreThenFifty
                            _this.$set(
                                gzxx,
                                'gczzsl',
                                !data.engineeringQualifications ?
                                    0 :
                                    data.engineeringQualifications
                            )
                        }
                    } else {
                        this.$message.error(res.resultMessage)
                    }
                })
            },
            // 企业名称模糊搜索
            SearchCompany () {
                let {
                    url,
                    userAxios,
                    cxjskSerch
                } = this

                const _this = this
                let data = {
                    invokeId: '12345678',
                    data: {
                        companyName: cxjskSerch,
                    },
                }
                // 获取各个列表
                let params = {
                    type: 'companySearchService',
                    data: JSON.stringify(data)
                }
                userAxios(url[1], params, (res) => {
                    if (res.resultCode != '0000') {
                        this.$message.error(res.resultMessage)
                    } else {
                        let data = res.data
                        let zz = new RegExp(cxjskSerch + '', 'ig')
                        data.forEach((e) => {
                            e.name = e.companyName.replace(
                                zz,
                                "<span class='name-style'>" + cxjskSerch + '</span>'
                            )
                        })

                        _this.cxjskList = data
                    }

                })
            },
            // 企业交易中心投中标信息查询
            qyjyzxtzbxxcx () {
                let {
                    url,
                    userAxios,
                    companyInfo,
                    invokeId,
                    getClock,
                    tzbsjListNum,
                    tzbsjtjsj,
                } = this
                if (!companyInfo.creditCode) {
                    this.$dialog.confirm({
                        title: '提示',
                        message: '请选择客户名称',
                    })
                        .then(() => {
                            this.showCreate = true
                        })
                        .catch(() => {
                            this.showCreate = true
                            // on cancel
                        });

                    return
                }
                console.log(tzbsjtjsj, '统计时间')
                this.showCreate = false
                this.showWinDetail = true
                this.showDetail = false
                this.showBuild = false
                const _this = this
                // let data = {
                //   invokeId,
                //   data: {
                //     // creditCode: companyInfo.creditCode,
                //     creditCode: '91510100MA61WYH12J',
                //     beginTime: tzbsjtjsj[0],
                //     endTime: tzbsjtjsj[1],
                //     pageIndex: tzbsjListNum,
                //     pageSize: 20,
                //   },
                // }
                let data = {
                    invokeId,
                    data: {
                        creditCode: companyInfo.creditCode,
                        // creditCode: '91350124064149509A',
                        beginTime: tzbsjtjsj[0],
                        endTime: tzbsjtjsj[1],
                        pageIndex: tzbsjListNum,
                        pageSize: 20,
                    },
                }
                let params = {
                    type: 'companyTradingCenterService',
                    data: JSON.stringify(data)
                }
                userAxios(url[1], params, (res) => {
                    if (res.resultCode != '0000') {
                        this.$message.error(res.resultMessage)
                    } else {
                        if (res.data) {
                            this.totalWin = res.data.totalSize
                            if (tzbsjListNum === 1) {
                                _this.tzbsjList = res.data.infos
                            } else {
                                _this.tzbsjList = _this.tzbsjList.concat(res.data.infos)
                                this.loadingW = false
                            }

                        } else {
                            if (tzbsjListNum === 1) {
                                _this.tzbsjList = []
                            }
                            // _this.tzbsjList = [..._this.tzbsjList]
                        }
                    }

                })
            },

            // 时间处理方法
            getClock (e) {
                var date = e
                var year = date.getFullYear()
                var month = date.getMonth() + 1
                month < 10 ? (month = '0' + month) : ''
                var day = date.getDate()
                day < 10 ? (day = '0' + day) : ''
                return year + '-' + month + '-' + day
            },
            //  线下管护权查询
            xxghqcx () {
                let {
                    url,
                    userAxios,
                    jbxx,
                    gxgh,
                    invokeId
                } = this
                if (!jbxx.tyshxydm) return
                const _this = this
                let xxghqerr = false
                gxgh.ghqy.forEach((e) => {
                    if (xxghqerr) {
                        return
                    }
                    let data = {
                        invokeId,
                        data: {
                            cusCertNo: jbxx.tyshxydm,
                            innerPlatformCode: e,
                        },
                    }
                    let params = {
                        type: 'postQuerystatus',
                        data: JSON.stringify(data)
                    }

                    userAxios(url[0], params, (res) => {
                        let data = res
                        if (data.code != '200') {
                            for (const i in _this.gxgh.ghqy) {
                                if (_this.gxgh.ghqy[i] == e) {
                                    _this.gxgh.ghqy.splice(i, 1)
                                    _this.jyzxtbpl.splice(i, 1)
                                }
                            }
                            let arr = document.getElementsByClassName('el-select-dropdown')
                            for (let i = 0; i < arr.length; i++) {
                                arr[i].style.display = 'none'
                            }
                            _this.$dialog.confirm({
                                title: '提示',
                                message: data.msg,
                                confirmButtonText: '确定',
                            })
                                .then(() => { })
                            xxghqerr = true
                        }
                    })
                })
            },

            // TODO: 客户取消预留
            cancel () { },

            // TODO: 客户保存预留
            yhxjkhycz (i) {
                let {
                    url,
                    userAxios,
                    userId,
                    jbxx,
                    gxgh,
                    xtxx,
                    gzxx,
                    ggzyjyzx,
                    jyzxtbpl,
                    tbpc
                } = this

                const _this = this

                // 获取各个列表
                let data = {
                    id: userId,
                    lxdz: gxgh.lxdz,
                    syr: xtxx.syr.table,
                    tyshxydm: jbxx.tyshxydm,
                    zcsf: jbxx.zcsf,
                    zcsq: jbxx.zcsq,
                    zcqx: jbxx.zcqx,
                    ggzyjyzx: gxgh.ghqy,
                    ele_open_info: {
                        ...gzxx,
                    },
                    ele_num: [...jyzxtbpl],
                    manage_grounp: {
                        ...gxgh,
                    },
                }
                let ghqyarr = []
                for (const e in data.ggzyjyzx) {
                    ghqyarr.push({
                        id: data.ggzyjyzx[e]
                    })
                }
                data.ggzyjyzx = ghqyarr
                this.$dialog.confirm({
                    title: '客户已存在',
                    message: i,
                    confirmButtonText: '共享',
                    cancelButtonText: '取消',
                })
                    .then(() => {
                        let params = {
                            type: 'sharedAccount',
                            data: JSON.stringify(data)
                        }
                        userAxios(url[0], params, (res) => {
                            let data = res
                            if (data.code != '200') {
                                _this.$dialog.confirm({
                                    title: '提示',
                                    message: data.msg,
                                    confirmButtonText: '确定',
                                })
                                    .then(() => { })
                            } else {
                                _this.$message({
                                    message: '共享成功!',
                                    type: 'success'
                                })
                                window.location.href =
                                    'https://k8mm3cmt3235c7ed72cede6e.cloudcc.com/#/weiquery.action?id=' + data.id + '&m=query'
                            }
                        })
                    })
                    .catch(() => { })
            },
            yhxjcsghq (i) {
                let {
                    url,
                    userAxios,
                    jbxx,
                    xtxx,
                    gxgh,
                    shText
                } = this

                const _this = this

                // 获取各个列表
                let data = {
                    syr: xtxx.syr.table,
                    tyshxydm: jbxx.tyshxydm,
                    ggzyjyzx: gxgh.ghqy,
                    shly: shText
                }
                let ghqyarr = []
                for (const e in data.ggzyjyzx) {
                    ghqyarr.push({
                        id: data.ggzyjyzx[e]
                    })
                }
                data.ggzyjyzx = ghqyarr
                this.$dialog.confirm({
                    title: '客户已存在',
                    message: i,
                    confirmButtonText: '拾回',
                    cancelButtonText: '取消',
                })
                    .then(() => {
                        this.showAddress = true
                    })
                    .catch(() => { })
            },

            //  客户保存预留
            submitFrom () {
                let ifnull = this.ifempty()
                console.log(ifnull)
                if (ifnull) {
                    console.log(this.submit)
                    if (this.submit) {
                        clearTimeout(this.submit)
                    }

                    let submitF = () => {
                        let {
                            url,
                            userAxios,
                            jbxx,
                            gzxx,
                            gxgh,
                            lyqd,
                            ggzyjyzx,
                            jyzxtbpl,
                            tbpc,
                            xtxx
                        } = this
                        const _this = this
                        let data = {
                            Account: {
                                ...jbxx,
                                ...lyqd,
                                syr: xtxx.syr.table,
                                cjr: xtxx.cjr.table,
                                khkhzt: xtxx.khkhzt,
                                khgjzt: xtxx.khgjzt,
                            },
                            ele_open_info: {
                                ...gzxx,
                            },
                            ele_num: [...jyzxtbpl],
                            manage_grounp: {
                                ...gxgh,
                            },
                        }
                        let ghqyarr = []
                        for (const e in data.manage_grounp.ghqy) {
                            ghqyarr.push({
                                id: data.manage_grounp.ghqy[e]
                            })
                        }
                        data.manage_grounp.ghqy = ghqyarr
                        let params = {
                            type: 'saveAccount',
                            data: JSON.stringify(data)
                        }
                        userAxios(url[0], params, (res) => {

                            // TODO: 200跳转
                            let data = res
                            _this.userId = data.id
                            switch (data.code) {
                                case '200':
                                    window.location.href =
                                        'https://k8mm3cmt3235c7ed72cede6e.cloudcc.com/#/weiquery.action?id=' + data.id +
                                        '&m=query'
                                    break
                                case '304':
                                    _this.yhxjkhghc(data.msg)
                                    break
                                case '303':
                                    _this.yhxjcsghq(data.msg)
                                    break
                                case '302':
                                    _this.yhxjkhycz(data.msg)
                                    break
                                case '305':
                                    window.location.href =
                                        'https://k8mm3cmt3235c7ed72cede6e.cloudcc.com/#/weiquery.action?id=' + data.id +
                                        '&m=query'
                                    break
                                case '301':
                                    _this.$message({
                                        type: 'warning',
                                        message: data.msg,
                                    })
                                    break
                            }
                        })
                    }
                    this.submit = setTimeout(submitF, 1000)
                }

            },

            // 资质明细页码改变
            zzmxCurentchange (e) {
                this.zzmxNum = e
            },
            // 地址选择事件
            zcssChange (e) {
                e
                this.jbxx.zcsq = ''
                this.jbxx.zcqx = ''
            },
            zcsqChange (e) {
                let {
                    url,
                    userAxios
                } = this
                const _this = this
                this.getQxlist(e, (res) => {
                    _this.qxList = res.data
                    this.jbxx.zcqx = ''
                })
            },
            // 请求区县地址
            getQxlist (e, f) {
                let {
                    url,
                    userAxios
                } = this
                let params = {
                    type: 'findMapCityInfo',
                    data: e
                }
                userAxios(url[0], params, (res) => {
                    f(res)
                })
            },
            zcqxChange (e) {
                console.log(e)
            },
            jyssChange (e) {
                e
                this.gxgh.jysq = ''
                this.gxgh.jyqx = ''
            },
            jysqChange (e) {
                let {
                    url,
                    userAxios
                } = this

                const _this = this
                // 城市区县
                this.getQxlist(e, (res) => {
                    _this.gxghqxList = res.data
                    this.gxgh.jyqx = ''
                })
            },
            jyqxChange (e) {
                console.log(e)
            },

            // 联系地址动态搜索
            lxdzDtssfun (queryString, cb) {
                funContent = {
                    className: "TestUpdate", // 类名 string
                    methodName: "queryGao", // 方法名 string
                    params: [], // 请求参数
                }
                let _this = this,
                    {
                        url,
                        userAxios
                    } = this
                funContent.className = 'SaveAccountTest'

                // 企业性质
                funContent.methodName = 'gen'
                funContent.params = [{
                    argType: 'java.lang.String',
                    argValue: queryString,
                },]

                userAxios(url[0], funContent, (res) => {
                    var gxghlxdzList = _this.gxghlxdzList
                    var results = queryString ?
                        gxghlxdzList.filter(_this.createFilter(queryString)) :
                        gxghlxdzList
                    // 调用 callback 返回建议列表的数据
                    cb(results)
                })
            },

            // 判断是否包含
            createFilter (queryString) {
                return (restaurant) => {
                    return (
                        restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) !==
                        -1
                    )
                }
            },

            lxdzSelect (item) {
                console.log(item, 'item')
            },

            lxdzSelectItemClick (ev) {
                console.log(ev, 'ev')
            },

            // 客户员工
            khlymhsskh (query, cb) {
                this.khlydqck = '客户推荐'
                this.khlymhss(query, cb)
            },
            khlymhssyg (query, cb) {
                this.khlydqck = '员工推荐'
                this.khlymhss(query, cb)
            },

            // 客户员工列表模糊
            khlymhss (queryString, cb) {
                let _this = this,
                    {
                        url,
                        userAxios,
                        khlydqck
                    } = this
                // 企业性质
                let methodName = ''
                console.log(methodName, 33)
                let data
                if (khlydqck == '员工推荐') {
                    methodName = 'findLikeUser'
                    data = {
                        name: queryString || ''
                    }
                } else {
                    methodName = 'findLikeAccount'
                    data = {
                        accountName: queryString || ''
                    }
                }
                let params = {
                    type: methodName,
                    accountName: data.accountName
                }
                userAxios(url[0], params, (res) => {
                    var List = khlydqck == '员工推荐' ? _this.tjyhList : _this.tjkhList
                    List = res.data
                    var results = queryString ?
                        List.filter(_this.khlymhsspd(queryString)) :
                        List
                    // 调用 callback 返回建议列表的数据
                    cb(results)
                })
            },

            // 判断是否包含
            khlymhsspd (queryString) {
                return (List) => {
                    return (
                        List.value.toLowerCase().indexOf(queryString.toLowerCase()) !== -1
                    )
                }
            },

            khlymhssSelect (item) {
                this.lyqd[this.khlydqck == '员工推荐' ? 'tjyh' : 'tjkh'] = item.label
            },

            khlymhssSelectItemClick (ev) {
                console.log(ev, 'ev')
            },

            // 非空验证
            ifempty () {
                this.activeNames = ['1', '2', '3', '4', '5']
                let num, name
                for (const i in this.$refs) {
                    if (this.$refs[i] && i != '') {
                        let refs
                        if (this.$refs[i].length) {
                            refs = this.$refs[i][0]
                        } else {
                            refs = this.$refs[i]
                        }
                        if (refs.value === '') {
                            if (!num) {
                                num = refs._uid
                                name = refs.$attrs['data-name']
                            } else if (num > refs._uid) {
                                num = refs._uid
                                name = refs.$attrs['data-name']
                            }
                        }
                    }
                }
                console.log(num, name)
                if (name) {
                    this.$message.error({
                        message: '必填项' + name + '不能为空',
                    })
                    // this.$message({
                    //   message: '必填项' + name + '不能为空',
                    //   type: 'success',
                    //   duration: 0
                    // })
                    return false
                }
                return true
            },
            // 新建错误
            yhxjkhghc (i) {
                let {
                    url,
                    userAxios,
                    userId,
                    jbxx,
                    gxgh,
                    xtxx,
                    gzxx,
                    ggzyjyzx,
                    jyzxtbpl,
                    tbpc
                } = this

                const _this = this
                let data = {
                    id: userId,
                    lxdz: gxgh.lxdz,
                    syr: xtxx.syr.table,
                    tyshxydm: jbxx.tyshxydm,
                    zcsf: jbxx.zcsf,
                    zcsq: jbxx.zcsq,
                    zcqx: jbxx.zcqx,
                    ggzyjyzx: gxgh.ghqy,
                    ele_open_info: {
                        ...gzxx,
                    },
                    ele_num: [...jyzxtbpl],
                    manage_grounp: {
                        ...gxgh,
                    },
                }
                let ghqyarr = []
                for (const e in data.ggzyjyzx) {
                    ghqyarr.push({
                        id: data.ggzyjyzx[e]
                    })
                }
                data.ggzyjyzx = ghqyarr
                this.$dialog.confirm({
                    title: '客户已存在',
                    message: i,
                    confirmButtonText: '领取',
                    cancelButtonText: '取消',
                })
                    .then(() => {
                        let params = {
                            type: 'receiveAccount',
                            data: JSON.stringify(data),
                        }

                        userAxios(url[0], params, (res) => {
                            let data = res
                            if (data.code != '200') {
                                _this.$dialog.confirm({
                                    title: '提示',
                                    message: data.msg,
                                    confirmButtonText: '确定',
                                })
                                    .then(() => {

                                    })
                            } else {
                                _this.$message({
                                    message: '领取成功!',
                                    type: 'success'
                                })
                                window.location.href = 'https://k8mm3cmt3235c7ed72cede6e.cloudcc.com/#/weiquery.action?id=' +
                                    data
                                        .id + '&m=query'
                            }
                        })
                    })
                    .catch(() => { })
            },

        },
        watch: {
            search_key (newv, oldv) {
                if (newv == "") {
                    this.search_list = [];
                    this.noSearchShow = false;
                    setTimeout(() => {
                        this.adMap();
                    }, 1000);
                }
            },
            // showDate(newV, oldV) {
            //     if (newV) {
            //       document.addEventListener('touchmove', function (event) {
            //         event.preventDefault();
            //         if (event.touches.length > 1) {
            //           event.preventDefault();
            //         }
            //       });
            //     }
            // },
            // showDates(newV, oldV) {
            //     if (newV) {
            //       document.addEventListener('touchmove', function (event) {
            //         event.preventDefault();
            //         if (event.touches.length > 1) {
            //           event.preventDefault();
            //         }
            //       });
            //     }
            // },
            'jbxx.zczb' (e) {
                e = e.replace(/^0*(?=[1-9]|0.)/, '')
                this.jbxx.zczb = /^[\d]*(\.[\d]*)?/.exec(e)[0]
            },
            'gzxx.yjzcjzss' (e) {
                e = e.replace(/^0*(?=[1-9]|0$)/, '')

                this.gzxx.yjzcjzss = /^(0|[1-9][0-9]*)/.exec(e) ?
                    /^(0|[1-9][0-9]*)/.exec(e)[0] :
                    '0'
            },
            'gzxx.ejzcjzss' (e) {
                e = e.replace(/^0*(?=[1-9]|0$)/, '')
                this.gzxx.ejzcjzss = /^(0|[1-9][0-9]*)/.exec(e) ?
                    /^(0|[1-9][0-9]*)/.exec(e)[0] :
                    '0'
            },
            'gzxx.gczzsl' (e) {
                e = e.replace(/^0*(?=[1-9]|0$)/, '')
                this.gzxx.gczzsl = /^(0|[1-9][0-9]*)/.exec(e) ?
                    /^(0|[1-9][0-9]*)/.exec(e)[0] :
                    '0'
            },
            'gxgh.ghqy' () {
                this.xxghqcx()
            },
            'showBuild' (e) {
                if (!e) {
                    document.documentElement.scrollTop = 0
                    document.body.scrollTop = 0
                    window.pageYOffset = 0
                }
            }
        }
    })
    // Vue.use(vant.Button)
    // Vue.use(vant.Calendar)
</script>

</html>